import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:haokezufang/pages/test/get/get_route_page.dart';
import 'package:haokezufang/pages/test/permission/permission_main.dart';
import 'package:haokezufang/pages/test/screenutil/screen_util_main.dart';
import 'package:haokezufang/pages/test/state/state_main.dart';

import '../utils/common_toast.dart';

class SettingPage extends StatelessWidget {
  const SettingPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('设置'),
      ),
      body: ListView(
        children: [
          SizedBox(
            width: MediaQuery.of(context).size.width,
            child: ElevatedButton(
                onPressed: () => CommonToast.showToast("退出成功"),
                child: const Text('退出')),
          ),
          ElevatedButton(
              onPressed: () {
                Get.to(() => const GetRoutePage());
              },
              child: const Text('GET路由')),
          ElevatedButton(
              onPressed: () {
                Get.to(() => StateMainPage());
              },
              child: const Text('GET状态管理')),
          ElevatedButton(
              onPressed: () {
                Get.to(() => const ScreenUtilMainPage());
              },
              child: const Text('屏幕适配')),
          ElevatedButton(
              onPressed: () {
                Get.to(() => const PermissionMainPage());
              },
              child: const Text('权限')),
        ],
      ),
    );
  }
}
